import App from './App'
import { setupInterceptors } from './api/interceptor'

// 初始化请求拦截器
setupInterceptors()

// #ifndef VUE3
import Vue from 'vue'
import uviewPlus, { setConfig } from 'uview-plus'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
setConfig({
  	config: {
  		unit: 'rpx'
  	},
  	props: {
  		radio: {
  			// size: 20 
  		}
  	}
  })
app.use(uviewPlus)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import uviewPlus, { setConfig } from 'uview-plus'
export function createApp() {
  const app = createSSRApp(App)
  setConfig({
  	config: {
  		unit: 'rpx'
  	},
  	props: {
  		radio: {
  			// size: 20 
  		}
  	}
  })
  app.use(uviewPlus)
  return {
    app
  }
}
// #endif